<template>
    <div>
        <el-container>
            <el-aside width="240px">
                <h1 class="logo">
                    <a href="/">
                        <img src="@/assets/img/logo.png" alt="">
                    </a>
                </h1>
                <slider-menu></slider-menu>
            </el-aside>
            <el-container>
                <el-header>Header</el-header>
                <el-main>
                    <router-view></router-view>
                </el-main>
                <el-footer>Footer</el-footer>
            </el-container>
        </el-container>
    </div>
</template>

<script>
    import SliderMenu from "./SliderMenu"

    export default {
        name: "Base",
        components: {
            SliderMenu
        }
    }
</script>

<style scoped lang="less">
    html, body {
        height: 100%;
    }

    .el-header, .el-footer {
        background-color: #B3C0D1;
        color: #333;
        text-align: center;
        line-height: 60px;
    }

    .el-aside {
        background-color: #001529;
        color: #333;
        text-align: center;
        line-height: 200px;
        height: 100vh;

        .logo {
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 10px 0;

            a {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                height: 100%;
                img {
                    display: block;
                    width: 80%;
                }
            }
        }
    }

    .el-main {
        background-color: #E9EEF3;
        color: #333;
        text-align: center;
        line-height: 160px;
    }

    body > .el-container {
        margin-bottom: 40px;
    }

    .el-container:nth-child(5) .el-aside,
    .el-container:nth-child(6) .el-aside {
        line-height: 260px;
    }

    .el-container:nth-child(7) .el-aside {
        line-height: 320px;
    }
</style>